/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Calendar;
import java.util.Date;

/**
 * <p>Project: javase202202 - D1
 * <p>Powered by Lisi On 2022-05-30 11:57:06
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class D1 {
    public static void main(String[] args) {
        //学习java 工具类 java.util.Date
        Date d1 = new Date();
        System.out.println(d1.getTime()); //1653883132619 2022-05-30 11:58:52

        System.out.printf("%tF %<tT%n",1653883132619L);

        System.out.println(d1.getYear()+1900); //2022

        Calendar c = Calendar.getInstance();
        System.out.println(c.get(Calendar.YEAR));//2022
        System.out.println(c.get(1));//2022

    }
}
